﻿/**
 * 我的站内信
 * @param pageNo
 */
function getMyMessage(pageNo, flag){
	$(".inset").removeClass("active");
	$("#mL_"+(flag+1)+"").addClass("active");
	
	$.ajax({
        type: "POST",
        url: contextPath + "/view/backlog/messages",
        dataType: "html",
        data: {'flag': flag, 'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
	
	
	
}



//员工授权
function getAgentNOAuthorizationUser(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/backlog/getAgentNOAuthorizationUser",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}



/**
 * 由我执行
 */
function getExcetorIsMe(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/backlog/excetor",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}



/**
 * 由我审批
 */
function getApprovaeIsMe(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/backlog/approvaer",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}



/**
 * 历史审批
 * @param pageNo
 */
function getApprovaeIsMeHistory(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/backlog/approvaerHistory",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}



/**
 * 付款与收款
 */
function getPayOrReceiveWithMe(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/backlog/getPayOrReceiveWithMe",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}



/**
 * 获取要绑定的设备
 */
function getDeviceBinding(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/backlog/getDeviceBinding",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}



/**
 * 获取要绑定的设备
 */
function getDeviceBindingAgent(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/backlog/getDeviceBindingAgent",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}



/**
 * 我的维修任务
 */
function getRepairTask(pageNo){
	$.ajax({
        type: "POST",
        url: contextPath + "/view/backlog/getRepairTask",
        dataType: "html",
        data: {'pageNo': pageNo, 'pageSize': 10},
        beforeSend: function () {
            $("#maincontent").html("");
            $("#beforeLoading").show();
            timeOutHint();
        },
        success: function (res) {
            if ("" != res) {
                $("#beforeLoading").hide();
                $("#maincontent").html(res);
            }
        },
        error: function(){
        	$("#beforeLoading").hide();
        	failHint();
        }
    });
}
